<template>
  <el-container style="height: 100%; display: flex; align-items: flex-end; border: 1px solid #eee;">
    <mica :luminosity="false"></mica>
    <el-aside :width="aside_width" style="height:100vh;" >
        <Aside :isCollapse="isCollapse"></Aside>
    </el-aside>

    <el-container class="main" style="height: calc(100vh - 60px);">
      <el-header style="text-align: right; font-size: 12px">
        <Header @doCollapse="doCollapse" :icon="icon"></Header>
      </el-header>

      <el-main style="height: 100%;">
<!--        <Main></Main>-->
        <router-view/>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
import Aside from "@/components/Aside";
import Header from "@/components/Header";
import Mica from "@/windows-ui/mica";
export default {
  name: "Index",
  components: { Header, Aside, Mica},
  data(){
    return{
      isCollapse:false,
      aside_width:'200px',
      icon:'el-icon-s-fold'
    }
  },
  methods:{
    doCollapse(){
      console.log(111);
      this.isCollapse=!this.isCollapse
      if(!this.isCollapse){//展开
        this.aside_width='200px'
        this.icon='el-icon-s-fold'
      }else{//收起
        this.aside_width='64px'
        this.icon='el-icon-s-unfold'
      }
    }
  }
}
</script>

<style scoped>
.el-header {
  color: #333;
  line-height: 60px;
}

.el-aside {
  color: #333;
}

.main {
  margin-left: 40px;
  border: 1px solid rgba(0, 0, 0, 0.0578);
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  background-color: rgba(255, 255, 255, 0.5);
}
</style>